import { GTextFiled } from "../../../../../com/mui/controls/GTextFiled";
import { OlympicBonusItem } from "./OlympicBonusItem";
import { GlobalClass } from "../../../../../com/mui/core/GlobalClass";
import { LoaderHelp } from "../../../../common/display/LoaderHelp";
import { ResFileConst } from "../../../resource/ResFileConst";
import { ObjCreate } from "../../common/ObjCreate";
type int = number;
//class OlympicGuessTotalItem
    
    export  class OlympicGuessTotalItem /* flash.display.Sprite */
    {
        constructor(arg1: string, arg2: string, arg3: int)
        {
            var iconURL: string;
            var text: string;
            var code: int;
            var txt: GTextFiled;
            var tf: Object /* flash.text.TextFormat */;
            var num: int;
            var item: OlympicBonusItem;
            var getResHandler: Function;

            var loc1;
            txt = null;
            getResHandler = null;
            iconURL = arg1;
            text = arg2;
            code = arg3;
            getResHandler = (): void
            {
                _icon.bitmapData = GlobalClass.getBitmapData(iconURL);
                return;
            }
            
            this._icon = new Object /* flash.display.Bitmap */();
            this.addChild(this._icon);
            LoaderHelp.addResCallBack(ResFileConst.OlympicGuess, getResHandler);
            txt = ObjCreate.createGTextField("", 15, 42, 120, 40, this);
            tf = txt.defaultTextFormat;
            tf.leading = 4;
            txt.defaultTextFormat = tf;
            txt.multiline = true;
            txt.wordWrap = true;
            txt.mouseEnabled = false;
            txt.htmlText = text;
            num = 1;
            item = new OlympicBonusItem(code, num);
            item.x = 25;
            item.y = 85;
            this.addChild(item);
            return;
        }

        /* internal */ /* var */_icon: Object /* flash.display.Bitmap */;
    }
